package com.freedom.pms.goods.infrastructure.persistence.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.freedom.pms.goods.infrastructure.persistence.pojo.po.GoodsSpuPO;
import com.freedom.pms.goods.infrastructure.persistence.pojo.query.AdminSpuPageQuery;
import org.apache.ibatis.annotations.Param;

public interface GoodsSpuMapper extends BaseMapper<GoodsSpuPO> {

    Page<GoodsSpuPO> selectGoodsSpuPage(Page<GoodsSpuPO> page, @Param("queryParams") AdminSpuPageQuery queryParams);

    GoodsSpuPO selectAdminDetail(@Param("id") Integer id);

    boolean upGoodSpu(@Param("spuId") Integer spuId, @Param("publishStatus") Integer publishStatus);

    boolean downGoodSpu(@Param("spuId") Integer spuId, @Param("publishStatus") Integer publishStatus, @Param("downMessage") String downMessage);

    boolean saveGoodsSpu(GoodsSpuPO GoodsSpuPO);
}